
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="/static/bootstrap-5.1.3-dist/css/bootstrap.css">
    <script type="text/javascript" src="/static/bootstrap-5.1.3-dist/js/bootstrap.js"></script>
    <title>添加购物车</title>
</head>
<style>
    .back{
        position: absolute;
        font-size: 26px;
        top:30px;
        left:40px;
        text-decoration: none;
        color: #000;
        font-weight: bold;
    }
    .back:hover{
        color: #000;
    }

    h2{
        text-align: center;
        margin-top: 15px;
    }

    .card{
        width: 1400px;
        height: 700px;
        background-color: #fffdfd;
        border-radius: 30px;
        border: none;
        box-shadow: 5px 5px 10px #adabab;
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        margin: auto;
    }

    .mod{
        padding: 70px 300px;
    }

    h3{
        margin-bottom: 50px;
    }
    .btn{
        margin-top: 50px;
    }

</style>
<body>
<a href="${pageContext.request.contextPath}/market" class="back">
    <span><</span>返回</a>
<h2>添加购物车</h2>
<div class="card mod">
    <h3>您要添加的商品是</h3>
    <div class="mb-3 row">
        <label for="staticName" class="col-sm-2 col-form-label">商品名称</label>
        <div class="col-sm-10">
            <input type="text" readonly class="form-control-plaintext" id="staticName" value="${goods.name}">
        </div>
    </div>
    <div class="mb-3 row">
        <label for="staticPrice" class="col-sm-2 col-form-label">商品单价</label>
        <div class="col-sm-10">
            <input type="text" readonly class="form-control-plaintext" id="staticPrice" value="${goods.price}">
        </div>
    </div>

    <form action="add_items" method="post">
        <input style="display: none" name="page" value="${page}">
        <input style="display: none" name="goodid" value="${goods.id}">
        <input style="display: none" name="price" value="${goods.price}">
        <div class="mb-3 row">
            <label for="inputGood" class="col-sm-3 col-form-label">请选择要购买的商品数量</label>
            <div class="col-sm-2">
                <input name="good_cnt" value="1" id="inputGood" class="form-control">
            </div>
        </div>

        <input type="submit" value="确认加入购物车" type="button" class="btn btn-outline-success">
    </form>
</div>

</body>
</html>
